public  class AbstractClass extends SuperClass{


    {
        this.str = "yelong";
        System.out.println("代码块");
    }

    static {
        System.out.println("静态代码块");
    }
    private static AbstractClass abstractClass = new AbstractClass();

    public AbstractClass() {
        System.out.println("构造方法");
    }

    public  static AbstractClass getInstance(){
        return abstractClass;
    }

    public static void main(String[] args) {
        AbstractClass instance = AbstractClass.getInstance();
    }
}

class SuperClass{

    public String str ;
    {
        System.out.println("超级代码块");
    }
    static {
        System.out.println("超级静态代码块");
    }

    public SuperClass() {
        System.out.println("超级构造方法");
    }
}

